/*
 * @[H]:  Copyright (c) 2021 Phytium Information Technology, Inc. 
 * 
 *  SPDX-License-Identifier: Apache-2.0. 
 * 
 * @Date: 2021-07-22 17:48:18
 * @LastEditTime: 2021-07-22 17:50:25
 * @Description:  Description of file
 * @Modify History: 
 * * * Ver   Who        Date         Changes
 * * ----- ------     --------    --------------------------------------
 */

#include "f_xmac.h"
#include "parameters.h"

extern FXmacConfig FXmacConfigTable[FT_UART_NUM];

/**
 * @name: Ft_Uart_LookupConfig
 * @msg:  
 * @param {u32} instance_id 
 * @return {*}
 */
FXmacConfig *FXmacLookupConfig(u32 instance_id)
{
    FXmacConfig *cfg_ptr = NULL;
    u32 index;

    for (index = 0; index < (u32)FT_UART_NUM; index++)
    {
        if (FXmacConfigTable[index].instance_id == instance_id)
        {
            cfg_ptr = &FXmacConfigTable[index];
            break;
        }
    }

    return (FXmacConfig *)cfg_ptr;
}
